<!DOCTYPE html>
<html ng-app="app">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta charset="UTF-8">
    <meta name="keyword" content="犀牛故事">
    <meta name="description" content="这是个故事app">
    <meta name="author" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>

<body>

<script>
    window.onload=function () {
        //第一步：创建对象--xhr，null都是一个对象
        var xhr = null;
        xhr=window.XMLHttpRequest? new XMLHttpRequest(): new ActiveXObject('Microsoft.XMLHTTP');  //兼容ie处理

        //第二步：先筹划，以什么方式发送请求，发送到那个端口(form.php)
        xhr.open('get','/api/mimi/get',true);

        xhr.onreadystatechange=function () {
            if(xhr.readyState==4){
                if(xhr.status==200) {
                    var data = xhr.responseText;
                    console.log(JSON.parse(data))

                }
            }
        };
        xhr.send(null);}

</script>

</body>
</html>